import httpRequest from '../../commonJs/http'
/**门店收款明细 */
const storeReceiptChannelApi= 'ddaigo-platform/finances/storeReceiptChannel';
/**获取对账单列表接口 */
const financialListApi= 'youbao/finance/api/finance-receivable/list';
/**打款汇总 */
const cashSummaryApi= 'youbao/finance/api/finance-payment/list';
/**打款流水接口 */
const cashFlowApi= 'youbao/finance/api/finance-payment/pay/list';
/**未打款记录 */
const noRecordOfPaymentApi= 'youbao/finance/api/finance-payment/pay/list/noPaid'
const getCashFlowDateApi= 'youbao/finance/api/finance-payment/pay/list/date'
/**第三方订单流水导出 */
const cashFlowDownloadApi ='youbao/finance/api/finance-payment/transaction/export'

const financialControlApi = {
    /**v1 门店收款渠道明细 */
    storeReceiptChannel: async (params) => {
        let data= await httpRequest.post(storeReceiptChannelApi, params);
        return data;
    },
    /**对账单列表 */
    getFinancialList: async (params) => {
        let data= await httpRequest.get(financialListApi, {params});
        return data;
    },
    /**对账单统计 */
    getFinancialStatic: async (params) => {
        let data= await httpRequest.get(financialListApi + '/total', {params});
        return data;
    },
    /**打款汇总  按日*/
    getCashSummaryList: async(params) => {
        let data= await httpRequest.get(cashSummaryApi + '/day', {params});
        return data;
    },
    /**打款汇总  按周*/
    getCashSummaryListByWeek: async(params) => {
        let data= await httpRequest.get(cashSummaryApi + '/week', {params});
        return data;
    },
    /**打款汇总  按周*/
    getCashSummaryListByMonth: async(params) => {
        let data= await httpRequest.get(cashSummaryApi + '/month', {params});
        return data;
    },
    /**获取打款流水列表 */
    getCashFlowList: async (params) => {
        let data= await httpRequest.get(cashFlowApi, {params});
        return data;
    },
    /**获取未打款记录 */
    getNoRecordOfPaymentApiList: async (params) => {
        let data= await httpRequest.get(noRecordOfPaymentApi, {params});
        return data;
    },
    /**查询打款日期 */
    getCashFlowDate: async(params) => {
        let data= await httpRequest.get(getCashFlowDateApi, {params});
        return data;
    },
    /**第三方流水下载 */
    cashFlowDownload: async (params) => {
        let data= await httpRequest.get(cashFlowDownloadApi, {params});
        return data;
    }
    

};
export default financialControlApi;